import request from "@/utils/request";

// POST /physicalCard/batch/list 查询油罐
export function list(data, pageNum, pageSize) {
  return request({
    url: `/physicalCard/batch/list?pageNum=${pageNum}&pageSize=${pageSize}`,
    method: "post",
    data: data,
  });
}

// GET /physicalCard/batch/delete 删除批次信息
export function cardDelete(query) {
  return request({
    url: "/physicalCard/batch/delete",
    method: "get",
    params: query,
  });
}

// POST /physicalCard/batch/save 保存批次信息
export function saveNewCard(data) {
  return request({
    url: "/physicalCard/batch/save",
    method: "post",
    data: data,
  });
}

// GET /physicalCard/export/physicalCardNo 导出卡号
export function physicalCardNo(query) {
  return request({
    url: "/physicalCard/export/physicalCardNo",
    method: "get",
    params: query,
  });
}

// GET /physicalCard/get 查询单个卡信息
export function getCardNo(query) {
  return request({
    url: "/physicalCard/get",
    method: "get",
    params: query,
  });
}

// GET /physicalCard/batch/firstNum 第一个未写卡成功的卡号
export function firstNum(query) {
  return request({
    url: "/physicalCard/batch/firstNum",
    method: "get",
    params: query,
  });
}

// POST /physicalCard/update/status 批量修改实体卡状态为 冻结、注销状态
export function statusCard(data) {
  return request({
    url: "/physicalCard/update/status",
    method: "post",
    data: data,
  });
}

// GET /physicalCard/getSecretKey获取密钥
export function getSecretKey(query) {
  return request({
    url: "/physicalCard/getSecretKey",
    method: "get",
    params: query,
  });
}

// GET /physicalCard/judge/card 判断是否可以写卡
export function judgeCard(query) {
  return request({
    url: "/physicalCard/judge/card",
    method: "get",
    params: query,
  });
}
